package com.example.demo.Service;

import cn.hutool.json.JSONObject;
import com.example.demo.Entity.Note;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Service
public interface NoteService {
    //ser(User user);
    public List<Note> findByUserId(Integer userId);
    public void insertNote(Note note);
    public Note selectByNoteId(Integer id);
    public void removeById(Integer id);
    public void saveOrUpdateNote(Note note);
    public List<Note> selectByTags(String tag);
    public List<Note> selectByTitle(String title);
    public List<Note> select(List<Integer> query,String scope,String content,Integer userId);
    public void takeFile(MultipartFile file) throws Exception;
    public void download(String fileName, HttpServletResponse response) throws Exception;
    public JSONObject findNameById(Integer noteId);
    public void upvote(Integer noteId);
    public void cancelUpvote(Integer noteId);
    public List<Note> findAll(Integer noteId);
    public Note findByNoteId(Integer noteId);
}
